package demo.security.example.impl;

import org.springframework.social.connect.Connection;
import org.springframework.social.connect.ConnectionSignUp;
import org.springframework.stereotype.Component;

/**
 * DemoConnectionSignUp
 *
 * @author lidj
 * @date 2018-02-09
 */
@Component
public class DemoConnectionSignUp implements ConnectionSignUp {
    @Override
    public String execute(Connection<?> connection) {
        /**
         * 根据社交用户信息默认创建用户返回用户唯一标识
         */
        return connection.getDisplayName();
    }
}
